package com.colorfruit.admin.business.dao;

import com.colorfruit.admin.pojo.entity.ShoppingCart;
import com.colorfruit.admin.pojo.vo.shopcard.ShopCartVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ShoppingCartMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ShoppingCart record);

    int insertSelective(ShoppingCart record);

    ShoppingCart selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShoppingCart record);

    int updateByPrimaryKey(ShoppingCart record);

    List<ShopCartVo> selectShoppingCartList(@Param("userId") String userId,
                                            @Param("productName") String productName,
                                            @Param("size") int size,
                                            @Param("globalControlId") Long globalControlId);

    ShoppingCart getDataByPreShelfId(@Param("userId") String userId,
                                     @Param("preShelfOrderId") Long preShelfOrderId,
                                     @Param("theDayBegin") Date theDayBegin,
                                     @Param("theDayEnd") Date theDayEnd);

    Integer deleteProduct(@Param("userId") String userId,
                          @Param("id") Long id);

    int updateProductStatus(@Param("userId") String userId,
                            @Param("preShelfOrderId") Long preShelfOrderId,
                            @Param("recordStatus") Byte recordStatus);
}